Repository navigation
Binder: companion objects as values; proxy identity equality (#322) - #324
Merged
Merged
Conversation
… compare by Kotlin object identity (#322) The walker binds Owner.<Companion> as a STATIC_GETTER whose generated Kotlin names the companion (kotlinc emits GETSTATIC), typed as Owner when the companion directly implements it, and exempt from the rule that drops a constructor beside an Owner.x key. A proxy class falls back to its same-named module's statics, and one Python name stays one thing: the proxy class wins over a module of the same name unless a declaration of that name is bound in the parent (#78's callable module), in the adapter and in PythonProxySource. Proxies are == when they hold the same Kotlin object (identity hash; is not guaranteed; Kotlin equals is not used). register_empty also takes the proxy class and a Python callable. Stubs render the handle as a class attribute.
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #322
The approved design, with the leader's decisions on equality (a) and register_empty:
Tests:
Mutants:
Results: plugin 350/350, artifact fixture 46/46, python-multiplatform desktopTest 643/643, compose fixture 129/129, ksp app fixture 79/79. androidNative, iOS simulator, wasmJs and Android debug compile pass.